package cn.dogger.system.controller;

import cn.dogger.system.service.DemoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dogger
 * 2022/10/15 14:11
 */
@RestController
@RequestMapping("system")
public class DemoController {

    private final DemoService service;

    public DemoController(DemoService service) {
        this.service = service;
    }

    @GetMapping("getString")
    public String getString(String req){
        String a = "dogger";
        System.out.println("远程调用了这个");
        return service.getString(req+a);
    }

    @GetMapping("aa")
    public String aa(){
        return "dogger";
    }
}
